<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://cdn.jsdelivr.net/npm/hapin-utils@4.0.0/dist/index.min.js"></script>
<!-- ZUI 标准版压缩后的 CSS 文件 -->
<link rel="stylesheet" href="//cdn.bootcdn.net/ajax/libs/zui/1.10.0/css/zui.min.css">
<!-- ZUI Javascript 依赖 jQuery -->
<script src="//cdn.bootcdn.net/ajax/libs/zui/1.10.0/lib/jquery/jquery.js"></script>
<!-- ZUI 标准版压缩后的 JavaScript 文件 -->
<script src="//cdn.bootcdn.net/ajax/libs/zui/1.10.0/js/zui.min.js"></script>
<title>哈拼转换器</title> 
</head>
<body>


<input id="pin" class="form-control" placeholder="哈拼转老文字">
<button type="button" onclick="hapin()" class="btn btn-primary" style="float:right;margin-top:5px;">转换</button><button onClick="copyFn()" class="btn btn-success " style="float:right;margin-right:20px;margin-top:5px;">复制</button>
<h3 id="demo"></h3>
<hr style="margin-top:50px;" >	
<input id="Cyrillic" class="form-control" placeholder="西里尔转哈拼">
<button type="button" onclick="CyrillicToHapin()" class="btn btn-primary" style="float:right;margin-top:5px;">转换</button><button onClick="copyFn2()" class="btn btn-success " style="float:right;margin-right:20px;margin-top:5px;">复制</button>
<h3 id="demo2"></h3>
<hr style="margin-top:50px;" >	
<input id="OldWord" class="form-control" placeholder="老文字转哈拼">
<button type="button" onclick="OldWordToHapin()" class="btn btn-primary" style="float:right;margin-top:5px;">转换</button><button onClick="copyFn3()" class="btn btn-success " style="float:right;margin-right:20px;margin-top:5px;">复制</button>
<h3 id="demo3"></h3>
	
	<span class="label label-primary label-outline">哈拼单字符字母表</span>
	<div class="dumi-default-table"><div class="dumi-default-table-content"><table class="table table-auto"><thead><tr><th>哈拼方案</th><th>老文字</th><th>西里尔字母</th></tr></thead><tbody><tr><td>a</td><td>ا</td><td>А а</td></tr><tr><td>b</td><td>ب</td><td>Б б</td></tr><tr><td>d</td><td>د</td><td>Д д</td></tr><tr><td>e</td><td>ى</td><td>Ы ы</td></tr><tr><td>f</td><td>ف</td><td>Ф ф</td></tr><tr><td>g</td><td>گ</td><td>Г г</td></tr><tr><td>h</td><td>ح</td><td>Х х</td></tr><tr><td>i</td><td>ي</td><td>Й й</td></tr><tr><td>j</td><td>ج</td><td>Ж ж</td></tr><tr><td>k</td><td>ك</td><td>К к</td></tr><tr><td>l</td><td>ل</td><td>Л л</td></tr><tr><td>m</td><td>م</td><td>М м</td></tr><tr><td>n</td><td>ن</td><td>Н н</td></tr><tr><td>o</td><td>و</td><td>О о</td></tr><tr><td>p</td><td>پ</td><td>П п</td></tr><tr><td>q</td><td>ق</td><td>Қ қ</td></tr><tr><td>r</td><td>ر</td><td>Р р</td></tr><tr><td>s</td><td>س</td><td>С с</td></tr><tr><td>t</td><td>ت</td><td>Т т</td></tr><tr><td>u</td><td>ۇ</td><td>Ұ ұ</td></tr><tr><td>v</td><td>ۆ</td><td>В в</td></tr><tr><td>w</td><td>ۋ</td><td>У у</td></tr><tr><td>z</td><td>ز</td><td>З з</td></tr></tbody></table></div></div>
	<span class="label label-primary label-outline">哈拼双字符字母表</span>
	<div class="dumi-default-table"><div class="dumi-default-table-content"><table class="table table-auto"><thead><tr><th>哈拼方案</th><th>老文字</th><th>西里尔字母</th></tr></thead><tbody><tr><td>ye</td><td>ە</td><td>Е е</td></tr><tr><td>gh</td><td>ع</td><td>Ғ ғ</td></tr><tr><td>hh</td><td>ھ</td><td>Һ һ</td></tr><tr><td>ng</td><td>ڭ</td><td>Ң ң</td></tr><tr><td>sh</td><td>ش</td><td>Ш ш</td></tr><tr><td>ch</td><td>چ</td><td>Ч ч</td></tr></tbody></table></div></div>
	<span class="label label-primary label-outline">哈拼弱音字符字母表</span>
	<div class="dumi-default-table"><div class="dumi-default-table-content"><table class="table table-auto"><thead><tr><th>哈拼方案</th><th>老文字</th><th>西里尔字母</th></tr></thead><tbody><tr><td>xa</td><td>ٴا</td><td>Ә ә</td></tr><tr><td>xe</td><td>ٴى</td><td>І і</td></tr><tr><td>xo</td><td>ٴو</td><td>Ө ө</td></tr><tr><td>xu / yu</td><td>ٴۇ</td><td>Ү ү</td></tr></tbody></table></div></div>
	<span class="label label-primary label-outline">哈拼西里尔字母表</span>
	<div class="dumi-default-table"><div class="dumi-default-table-content"><table class="table table-auto"><thead><tr><th>哈拼方案</th><th>老文字</th><th>西里尔字母</th></tr></thead><tbody><tr><td>io / yo</td><td>يو</td><td>Ё ё</td></tr><tr><td>i / yi</td><td>ي</td><td>И и</td></tr><tr><td>shsh</td><td>شش</td><td>Щ щ</td></tr><tr><td>ts / c</td><td>تس</td><td>Ц ц</td></tr><tr><td>xx</td><td>--</td><td>Ъ ъ</td></tr><tr><td>xy</td><td>--</td><td>Ь ь</td></tr><tr><td>ye</td><td>ە</td><td>Э э</td></tr><tr><td>iw / yw</td><td>يۋ</td><td>Ю ю</td></tr><tr><td>ia / ya</td><td>يا</td><td>Я я</td></tr></tbody></table></div></div>

<footer style="float:right;">
  <p>Power by
  <a href="https://hapin.js.org" target="_blank">哈拼方案</a></p>
</footer>
<script>
	function hapin() {
		var  text;
    	text = document.getElementById("pin").value;
		document.getElementById("demo").innerHTML = transformHapinToArabic(text);
	}
	function CyrillicToHapin() {
		var  text;
    	text = document.getElementById("Cyrillic").value;
		document.getElementById("demo2").innerHTML = transformCyrillicToHapin(text);
	}
    function OldWordToHapin() {
		var  text;
    	text = document.getElementById("OldWord").value;
		document.getElementById("demo3").innerHTML = transformArabicToHapin(text);
	}
</script>
<script>
    function copyFn(){
        var val = document.getElementById('demo');
        window.getSelection().selectAllChildren(val);
        document.execCommand ("Copy");
    }
	function copyFn2(){
        var val = document.getElementById('demo2');
        window.getSelection().selectAllChildren(val);
        document.execCommand ("Copy");
    }
    function copyFn3(){
        var val = document.getElementById('demo3');
        window.getSelection().selectAllChildren(val);
        document.execCommand ("Copy");
    }
</script>
</body>
</html>